#pragma once

#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QGroupBox>

class RenderWidget;

class LinearEquationWindow : public QWidget {
    Q_OBJECT

public:
    explicit LinearEquationWindow(QWidget *parent = nullptr);
    ~LinearEquationWindow() override = default;

private slots:
    void onSolveClicked();
    void onResetClicked();

private:
    RenderWidget  *render_;     // 渲染控件

    QGroupBox     *ctrlGroup_;  // 控制面板
    QLineEdit     *leA11_, *leA12_;  // 2x2 系数矩阵输入
    QLineEdit     *leA21_, *leA22_;  // 2x2 系数矩阵输入
    QLineEdit     *leB1_,  *leB2_;      // 常数项向量输入
    QPushButton   *btnSolve_, *btnReset_;   //触发求解操作

    void setupUi();
};
